<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="https://d3js.org/d3.v4.min.js"></script>

</head>
<body>


	<script type="text/javascript">

		var div = d3.select("body").selectAll("div").data([])

		var matrix = [
		  [11975,  5871, 8916, 2868],
		  [ 1951, 10048, 2060, 6171],
		  [ 8010, 16145, 8090, 8045],
		  [ 1013,   990,  940, 6907]
		];

		var tr = d3.select("body").append("table").selectAll("tr").data(matrix).enter().append("tr");

		tr.selectAll("td").data(function(d) {return d}).enter().append("td").text(function(d) {return d;});
		
	</script>
</body>
</html>